package org.example.commons.utils;

import org.springframework.data.domain.Sort;

/**
 * @author bothin
 */
public class SortUtils {

    public static Sort getSort(Boolean isAsc,String field){
        return isAsc ? Sort.by(field).ascending() : Sort.by(field).descending();
    }

}
